import numpy as np
from typing import List
import matplotlib.pyplot as plt
import math

def sample(n:int, N:int)->float:
    return math.sin(2 * math.pi * 4 * n / N)

samplesTimeDomain:List[float] = [sample(n, 64) for n in range(0, 64)]
samplesFrequencyDomain = np.fft.fft(samplesTimeDomain)
samplesFrequencyDomainReal:List[float] = [np.real(sample) for sample in samplesFrequencyDomain]
samplesFrequencyDomainImag:List[float] = [np.imag(sample) for sample in samplesFrequencyDomain]

plt.plot(samplesTimeDomain, 'r.-', samplesFrequencyDomainReal, 'g.-', samplesFrequencyDomainImag, 'b.-')
plt.show()
